package com.bangdream.michelia.entity;

import com.alibaba.fastjson.JSON;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Transient;

import java.io.Serializable;
import java.util.List;
import org.greenrobot.greendao.annotation.Generated;

/**
 * @date on 2018/8/4 16:27
 * @email 909732184@qq.com
 */
@Entity
public class CoursesTypeBean implements Serializable{

    /**
     * id : 937b08f509ec4c3992ab537f28607dc8
     * createBy : 4a9e5b78acd2474f95fc12df401a4424
     * createTime : 2018-06-22 14:59:14
     * updateBy : 4a9e5b78acd2474f95fc12df401a4424
     * updateTime : 2018-06-22 14:59:14
     * delFlag : 0
     * orgId : a
     * createName : admin
     * parentId : 0
     * parentIds : 0
     * name : 课程分类2
     * sort : 0
     */
    //不能用int 主键

    //GreenDao实体类实现Serializable需要添加下面这句
    static final long serialVersionUID = 42L;
    @org.greenrobot.greendao.annotation.Id(autoincrement = true)
    private Long tabId;
    @Property(nameInDb = "id")
    private String id;
    @Property(nameInDb = "createBy")
    private String createBy;
    @Property(nameInDb = "createTime")
    private String createTime;
    @Property(nameInDb = "updateBy")
    private String updateBy;
    @Property(nameInDb = "updateTime")
    private String updateTime;
    @Property(nameInDb = "delFlag")
    private String delFlag;
    @Property(nameInDb = "orgId")
    private String orgId;
    @Property(nameInDb = "createName")
    private String createName;
    @Property(nameInDb = "parentId")
    private String parentId;
    @Property(nameInDb = "parentIds")
    private String parentIds;
    @Property(nameInDb = "name")
    private String name;
    @Property(nameInDb = "sort")
    private int sort;
    //标识创建表时忽略这个字段
    @Transient
    private List<CoursesTypeBean> nodes;

    @Generated(hash = 786941601)
    public CoursesTypeBean(Long tabId, String id, String createBy,
            String createTime, String updateBy, String updateTime, String delFlag,
            String orgId, String createName, String parentId, String parentIds,
            String name, int sort) {
        this.tabId = tabId;
        this.id = id;
        this.createBy = createBy;
        this.createTime = createTime;
        this.updateBy = updateBy;
        this.updateTime = updateTime;
        this.delFlag = delFlag;
        this.orgId = orgId;
        this.createName = createName;
        this.parentId = parentId;
        this.parentIds = parentIds;
        this.name = name;
        this.sort = sort;
    }

    @Generated(hash = 475060049)
    public CoursesTypeBean() {
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

    public List<CoursesTypeBean> getNodes() {
        return nodes;
    }

    public void setNodes(List<CoursesTypeBean> nodes) {
        this.nodes = nodes;
    }

    public Long getTabId() {
        return this.tabId;
    }

    public void setTabId(Long tabId) {
        this.tabId = tabId;
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCreateBy() {
        return this.createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateBy() {
        return this.updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public String getUpdateTime() {
        return this.updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getDelFlag() {
        return this.delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getOrgId() {
        return this.orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getCreateName() {
        return this.createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    public String getParentId() {
        return this.parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getParentIds() {
        return this.parentIds;
    }

    public void setParentIds(String parentIds) {
        this.parentIds = parentIds;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSort() {
        return this.sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

}
